import request from '@/utils/request'

const apiHosp_name = '/api/hosp/hospital'

export default{

    //查询医院列表接口
    getPageList(page,limit,searchObj){
        return request({
            url:`${apiHosp_name}/list/${page}/${limit}`,
            method:'get',
            params:searchObj
        })
    },

    //根据医院名称模糊查询
    getByHosname(hosname){
        return request({
            url:`${apiHosp_name}/findByHosname/${hosname}`,
            method:'get'
        })
    },

    //根据医院编号，获取医院详情信息
    findHosDetailsByHosCode(hoscode){
        return request({
            url:`${apiHosp_name}/findHosDetailsByHosCode/${hoscode}`,
            method:'get'
        })
    },

    //根据医院编号获取科室列表
    findDeptListByHosCode(hoscode){
        return request({
            url:`${apiHosp_name}/findDeptListByHosCode/${hoscode}`,
            method:'get'
        })
    },

    //获取当前科室，可预约排班数据
    getBookingScheduleRule(page, limit, hoscode, depcode) {
        return request({
            url: `${apiHosp_name}/auth/getBookingScheduleRule/${page}/${limit}/${hoscode}/${depcode}`,
            method: 'get'
        })
    },

    //获取当前日期下，具体的排班数据
    findScheduleList(hoscode, depcode, workDate) {
        return request({
            url: `${apiHosp_name}/auth/findScheduleList/${hoscode}/${depcode}/${workDate}`,
            method: 'get'
        })
    },
    
    //获取排班对象信息
    getSchedule(id) {
        return request({
          url: `${apiHosp_name}/getSchedule/${id}`,
          method: 'get'
        })
    }        
}